<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 26731
  Date: 2021/11/7
  Time: 16:52
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>cities</title>
    <style type="text/css">
        .tab{

            width: 835px;
            height: 900px;


        }

        .tab2{
            width: auto;
            height: 800px;
            margin: 0 auto;
            overflow-x: hidden; /* 隐藏水平滚动栏 */
            overflow-y: auto;

        }

        .tab3{
            width: auto;
            height: 20%;
        }
    </style>
</head>
<body>
<div class="tab">
    <table  border="1px" bordercolor="black" cellspacing="0px" cellpadding="0px">
        <tr>
            <th colspan="6">城市一览</th>
        </tr>
        <tr>
            <td width="60px" align="center"></td>
            <td width="60px" align="center">城市Id</td>
            <td width="220px" align="center">城市名</td>
            <td width="120px" align="center">国家代码</td>
            <td width="170px" align="center">区域</td>
            <td width="170px" align="center">人口</td>
        </tr>
    </table>
    <form action="/m?method=delete" method="post">
        <div class="tab2">
            <table border="1px" bordercolor="black" cellspacing="0px" cellpadding="0px">
                <c:forEach items="${cities}" var="city" varStatus="s">
                    <tr <c:if test="${s.index%2==0}">style="background-color: darkgray" </c:if>>
                    <td width="60px" align="center"><input type="checkbox" name="box" value="${city.ID}" /></td>
                    <td width="60px" align="center"><c:out value="${city.ID}"></c:out> </td>
                    <td width="220px" align="center"><c:out value="${city.name}"></c:out></td>
                    <td width="120px" align="center"><c:out value="${city.countryCode}"></c:out></td>
                    <td width="170px" align="center"><c:out value="${city.district}"></c:out></td>
                    <td width="170px" align="center"><c:out value="${city.population}"></c:out></td>
                    </tr>
                </c:forEach>



            </table>

        </div>
        <div class="tab3">
            <input type="submit" value="删除" />
        </div>
    </form>

</div>
</body>
</html>
